package com.zxjbyte.yiyi.module.system.api.log;

import com.zxjbyte.yiyi.framework.common.constant.Constant;
import com.zxjbyte.yiyi.module.system.domain.dto.log.ErrorLogAddDTO;
import com.zxjbyte.yiyi.module.system.service.log.IErrorLogService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author zhangxingjia
 * @Date 2023/3/17 17:30
 * @Version: 1.0
 */
@Service
public class ErrorLogApiImpl implements ErrorLogApi{

    @Resource
    private IErrorLogService errorLogService;

    @Override
    @Async(Constant.DEFAULT_THREAD_POOL)
    public void asyncAdd(ErrorLogAddDTO addDto) {
        errorLogService.add(addDto);
    }
}
